package com.luoshi.common.exception.ucenter;

import com.luoshi.common.result.ResultCodeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @ClassName PasswordException
 * @Description:密码异常类
 * @Author luochangqin
 * @Date 2021/6/20
 * @Version V1.0
 **/
@Data
@ApiModel(value = "自定义密码异常类")
public class PasswordException extends RuntimeException{

    @ApiModelProperty(value = "错误代码")
    protected Integer code;

    public PasswordException(ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();
    }
}
